
/*
 * @Descripttion: 用户登录模块
 * @Author: 银河以北
 * @Date: 2021-08-18 17:22:11
 * @LastEditors: 银河以北
 * @LastEditTime: 2021-09-25 21:01:43
 */

import { request } from '@/utils/request'

/**
 * @Description: 用户登录
 * @Author: 银河以北
 * @Date: 2021-08-10 00:02:25
 * @param {*}
 * @return {*}
 */
export function login(data: any) {
    return request({
        url: '/chat/login',
        method: 'POST',
        data
    })
}

/**
 * @Description: 获取用户信息
 * @Author: 银河以北
 * @Date: 2021-08-10 00:02:25
 * @param {*}
 * @return {*}
 */
export function getUserInfo() {
    return request({
        url: '/chat/getUserInfo',
        method: 'GET',
    })
}

/**
 * @Description: 用于前台用户退出登录 携带token即可
 * @Author: 银河以北
 * @Date: 2021-06-15 19:23:54
 * @param {*}
 * @return {*}
 */
export function logout() {
    return request({
        url: '/chat/userLogout',
        method: 'POST',
    })
}
